<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTablePost extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//
		Schema::create('post', function($table){
			$table->bigIncrements('id');
			$table->string('title', 150);
			$table->mediumText('description');
			$table->longText('content');
			$table->string('image');
			$table->bigInteger('user')->unsigned();
			$table->bigInteger('category')->unsigned();
			$table->boolean('active');
			$table->dateTime('published_date')->nullable();
			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}

}
